package com.sg.dto.integration.calc;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc RedisBusinessDataResDto
 * @使用场景
 */
@Data
public class RedisBusinessDataResDto extends BaseDto implements Serializable {

    /**
     * 周期ID（目标周期ID）
     */
    @ApiModelProperty("周期ID（目标周期ID）")
    private String periodId;

    /**
     * 周期类型标识
     */
    @ApiModelProperty("周期类型标识")
    private String cycleTypeCode;

    /**
     * 周期类型实例标识
     */
    @ApiModelProperty("周期类型实例标识")
    private String cycleTypeInstanceCode;

    /**
     * 周期开始时间
     */
    @ApiModelProperty("周期开始时间")
    private Date cycleStartTime;

    /**
     * 周期结束时间
     */
    @ApiModelProperty("周期结束时间")
    private Date cycleEndTime;

    /**
     * 更新周期开始时间
     */
    @ApiModelProperty("更新周期开始时间")
    private String updateCycleStartTime;

    /**
     * 更新周期结束时间
     */
    @ApiModelProperty("更新周期结束时间")
    private String updateCycleEndTime;

    /**
     * 更新周期类型标识
     */
    @ApiModelProperty("更新周期类型标识")
    private String updateCycleTypeCode;

    /**
     * 冗余单位
     */
    @ApiModelProperty("冗余单位")
    private String unit;

    /**
     * 填报评价责任人对象ID
     */
    @ApiModelProperty("填报评价责任人对象ID")
    private String personLiableObjId;

    /**
     * 填报评价责任人业务角色对象ID
     */
    @ApiModelProperty("填报评价责任人业务角色对象ID")
    private String bizRoleObjId;

    /**
     * 填报评价责任人业务角色标识
     */
    @ApiModelProperty("填报评价责任人业务角色标识")
    private String bizRoleObjCode;

    /**
     * 填报评价责任人业务角色对象名称
     */
    @ApiModelProperty("填报评价责任人业务角色对象名称")
    private String bizRoleObjName;

    /**
     * 扩展字段3（科目ID）
     */
    @ApiModelProperty("扩展字段3（科目ID）")
    private String extendedField3;

    /**
     * 上一周期被评对象目标周期ID
     */
    @ApiModelProperty("上一周期被评对象目标周期ID")
    private String lastEvaObjTargetCycleId;

    /**
     * 上一周期ID
     */
    @ApiModelProperty("上一周期ID")
    private String lastCycleId;

    /**
     * 是否工作周期数据
     */
    @ApiModelProperty("是否工作周期数据")
    private String isWorkCycleData;

    /**
     * 父子中周期类型
     */
    @ApiModelProperty("父子中周期类型")
    private String parentSubMidCycleType;

    /**
     * 标准数据计算周期模型
     */
    @ApiModelProperty("标准数据计算周期模型")
    private String standardDataCalcCycleModel;

    /**
     * 工作周期更新切片
     */
    @ApiModelProperty("工作周期更新切片")
    private String workCycleUpdateSlice;

    /**
     * 内容表类型编码
     */
    @ApiModelProperty("内容表类型编码")
    private String tableTypeCode;

    /**
     * 冗余一级目标分类ID
     */
    @ApiModelProperty("冗余一级目标分类ID")
    private String rootTargetCategoryId;

    /**
     * 虚拟组织成员就职记录ID
     */
    @ApiModelProperty("虚拟组织成员就职记录ID")
    private String virtualOrgInductionRecordId;

    /**
     * 角色ID
     */
    @ApiModelProperty("角色ID")
    private String roleId;

    /**
     * 角色标识
     */
    @ApiModelProperty("角色标识")
    private String roleCode;

    /**
     * 角色名称
     */
    @ApiModelProperty("角色名称")
    private String roleName;

    /**
     * 账户ID
     */
    @ApiModelProperty("账户ID")
    private String accountId;

    /**
     * 账户余额
     */
    @ApiModelProperty("账户余额")
    private String accountActualBalance;

    /**
     * 可用金额
     */
    @ApiModelProperty("可用金额")
    private String settlableBalance;

    /**
     * 冻结金额
     */
    @ApiModelProperty("冻结金额")
    private String unSettlableBalance;

    /**
     * 累计结算金额
     */
    @ApiModelProperty("累计结算金额")
    private String accruedSettledAmount;

    /**
     * 总金额
     */
    @ApiModelProperty("总金额")
    private String totalBudgetAmount;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        RedisBusinessDataResDto that = (RedisBusinessDataResDto) o;
        return (
                periodId == that.periodId &&
                        cycleTypeCode == that.cycleTypeCode &&
                        cycleTypeInstanceCode == that.cycleTypeInstanceCode &&
                        cycleStartTime == that.cycleStartTime &&
                        cycleEndTime == that.cycleEndTime &&
                        updateCycleStartTime == that.updateCycleStartTime &&
                        updateCycleEndTime == that.updateCycleEndTime &&
                        updateCycleTypeCode == that.updateCycleTypeCode &&
                        unit == that.unit &&
                        personLiableObjId == that.personLiableObjId &&
                        bizRoleObjId == that.bizRoleObjId &&
                        bizRoleObjCode == that.bizRoleObjCode &&
                        bizRoleObjName == that.bizRoleObjName &&
                        extendedField3 == that.extendedField3 &&
                        lastEvaObjTargetCycleId == that.lastEvaObjTargetCycleId &&
                        lastCycleId == that.lastCycleId &&
                        isWorkCycleData == that.isWorkCycleData &&
                        parentSubMidCycleType == that.parentSubMidCycleType &&
                        standardDataCalcCycleModel == that.standardDataCalcCycleModel &&
                        workCycleUpdateSlice == that.workCycleUpdateSlice &&
                        tableTypeCode == that.tableTypeCode &&
                        rootTargetCategoryId == that.rootTargetCategoryId &&
                        virtualOrgInductionRecordId == that.virtualOrgInductionRecordId &&
                        roleId == that.roleId &&
                        roleCode == that.roleCode &&
                        roleName == that.roleName &&
                        accountId == that.accountId &&
                        accountActualBalance == that.accountActualBalance &&
                        settlableBalance == that.settlableBalance &&
                        unSettlableBalance == that.unSettlableBalance &&
                        accruedSettledAmount == that.accruedSettledAmount &&
                        totalBudgetAmount == that.totalBudgetAmount
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                periodId,
                cycleTypeCode,
                cycleTypeInstanceCode,
                cycleStartTime,
                cycleEndTime,
                updateCycleStartTime,
                updateCycleEndTime,
                updateCycleTypeCode,
                unit,
                personLiableObjId,
                bizRoleObjId,
                bizRoleObjCode,
                bizRoleObjName,
                extendedField3,
                lastEvaObjTargetCycleId,
                lastCycleId,
                isWorkCycleData,
                parentSubMidCycleType,
                standardDataCalcCycleModel,
                workCycleUpdateSlice,
                tableTypeCode,
                rootTargetCategoryId,
                virtualOrgInductionRecordId,
                roleId,
                roleCode,
                roleName,
                accountId,
                accountActualBalance,
                settlableBalance,
                unSettlableBalance,
                accruedSettledAmount,
                totalBudgetAmount
        );
    }

}
